package com.isoft.c2team3service2.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.isoft.c2team3service2.entity.Head;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface HeadMapper extends BaseMapper<Head> {
    @Select("select photo from tb_head where email= #{email};")
    String upLode(String email);

    @Select("select photo from tb_head where user_id= #{user_id};")
    String selectHead(@Param("user_id") Integer userId);

    @Update("UPDATE tb_head " +
            "SET user_id = #{user_id} " +
            "WHERE user_id = #{user_id} ")
    boolean updatePhoto(@Param("user_id") Integer id);
}
